﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.freegiftsale.ui {
    import flash.display.*;
    import org.aswing.*;
    import Classes.*;
    import org.aswing.geom.*;
    import flash.text.*;
    import Display.aswingui.*;

    public class TimerCell extends JPanel {

        public static var FONT_SIZE:int = 22;

        private var textField:JTextField;

        public function TimerCell(){
            super(new FlowLayout(FlowLayout.CENTER, 0, 0));
            this.makeBackground();
            this.makeTextField();
        }
        public function set digit(_arg1:int):void{
            this.textField.setText(new String(_arg1));
            this.repaint();
        }
        private function makeBackground():void{
            var _local1:DisplayObject = (new EmbeddedArt.timer_slot() as DisplayObject);
            var _local2:MarginBackground = new MarginBackground(_local1, new Insets(0, 0, 0, 0));
            this.setBackgroundDecorator(_local2);
            this.setPreferredSize(new IntDimension(_local1.width, _local1.height));
            this.setMinimumSize(new IntDimension(_local1.width, _local1.height));
            this.setMaximumSize(new IntDimension(_local1.width, _local1.height));
        }
        private function makeTextField():void{
            var _local1:TextFormat = new TextFormat();
            _local1.align = TextFormatAlign.CENTER;
            this.textField = ASwingHelper.makeTextField("0", EmbeddedArt.TITLE_FONT, TimerCell.FONT_SIZE, EmbeddedArt.lightOrangeTextColor, 3, _local1);
            ASwingHelper.setEasyBorder(this.textField, 0, -2, 0);
            this.append(this.textField);
        }

    }
}//package Modules.freegiftsale.ui 
